package com.sunyard.pcc.common.exception;

import com.sunyard.pcc.common.constant.ErrorCodeEnum;
import lombok.Data;

/**
 * @Author: Hewei
 * @Description:
 * @Date: Created in 14:06 2018/2/23
 */
@Data
public class PccCommonException extends RuntimeException {

    private String code;

    public PccCommonException() {
        super();
    }

    public PccCommonException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getErrorMsg());
        this.code = errorCodeEnum.getErrorCode();
    }

    public PccCommonException(String code, String message) {
        super(message);
        this.code = code;
    }

}
